//
//  UIView+Separator.h
//  JQKit
//
//  Created by JQZ on 2017/11/22.
//  Copyright © 2017年 JQZ. All rights reserved.
//

#import <UIKit/UIKit.h>

#define     SEPERATOR_DEFAULT_COLOR       [UIColor colorWithRed:220.0/255.0 green:220.0/255.0 blue:220.0/255.0 alpha:1.0]

typedef NS_ENUM(NSInteger, SeparatorPosition) {
    SeparatorPositionTop,
    SeparatorPositionBottom,
    SeparatorPositionLeft,
    SeparatorPositionRight,
    SeparatorPositionCenterX,
    SeparatorPositionCenterY,
};

@class SeparatorModel;
@interface SeparatorChainModel : NSObject

/// 偏移量（相对于方向）
- (SeparatorChainModel *(^)(CGFloat offset))offset;
/// 颜色
- (SeparatorChainModel *(^)(UIColor *color))color;
/// 起点
- (SeparatorChainModel *(^)(CGFloat begin))beginAt;
/// 长度
- (SeparatorChainModel *(^)(CGFloat length))length;
/// 终点（优先使用长度）
- (SeparatorChainModel *(^)(CGFloat end))endAt;
/// 线粗
- (SeparatorChainModel *(^)(CGFloat borderWidth))borderWidth;

@end

@interface UIView (Separator)

- (SeparatorChainModel *(^)(SeparatorPosition position))addSeparator;

- (void (^)(SeparatorPosition position))removeSeparator;

- (void)updateSeparator;

@end
